<template>
  <el-dialog :visible.sync="isDialog"
    :title="typeStr"
    width="600px">
    <el-form :model="form"
      ref="form"
      :rules="rules"
      label-position="left"
      label-width="100px">
      <el-form-item label="人员">

      </el-form-item>
      <el-form-item label="选择日期">
        <el-date-picker v-model="form.date"
          type="date"
          placeholder="选择日期"
          value-format="yyyy-MM-dd">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="任务余量">

      </el-form-item>
      <el-form-item label="任务">
        <el-input-number v-model="form.num"
          :min="1"
          :step="1"
          :precision="0"></el-input-number>
      </el-form-item>
    </el-form>

    <span slot="footer">
      <el-button @click="isDialog = false">取 消</el-button>
      <el-button @click="submit"
        type="primary">提 交</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: {
    type: {
      type: String,
      default: ''
    }
  },

  data() {
    return {
      isDialog: false,
      rules: {},
      form: {}
    }
  },

  computed: {
    typeStr() {
      switch (this.type) {
        case 'set':
          return '设置任务'
        case 'edit':
          return '任务修改'
      }
    }
  },

  methods: {
    submit() {}
  }
}
</script>

<style>
</style>
